<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作业8</title>
</head>
<body>
<script>
    //输出1到1000之间既能被5整除又能被3整除的数，并且每行输出4个，并打印输出满足条件的数的个数
    var count = 0;
    var str = "";
    for (let i = 1; i < 1001; i++) {
        if (i % 5 == 0 && i % 3 == 0) {
            count++;
            str += i + " ";
            if (count % 4 == 0) {
                str += "\n";
            }
        }
    }
    console.log(str);
    console.log("总共：" + count + "个");
</script>
</body>
</html>